﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using $myprojectname$.Infrastructure.Abstract.Services;
using $myprojectname$.Infrastructure.Services;

namespace $myprojectname$.Infrastructure.Filters
{
    /// <summary>
    /// HandleError attribute implementation.
    /// </summary>
    public class HandleError : HandleErrorAttribute
    {
        private static ILoggingService logger = new Log4NetLoggingService();

        public override void OnException(ExceptionContext filterContext)
        {
            if (filterContext.Exception != null)
            {
                logger.Error(filterContext.Exception);
            }

            base.OnException(filterContext);
        }
    }
}
